home *** CD-ROM | disk | FTP | other *** search
/ Linux Cubed Series 4: GNU Archives / Linux Cubed Series 4 - GNU Archives.iso / gnu / sharutil.2 / sharutil / sharutils-4.2 / intl / Makefile.in < prev    next >
Encoding:
Makefile  |  1995-12-04  |  5.0 KB  |  167 lines

  1. # Makefile for directory with message catalog handling in GNU NLS Utilities.
  2. # Copyright (C) 1995 Free Software Foundation, Inc.
  3. #
  4. # This program is free software; you can redistribute it and/or modify
  5. # it under the terms of the GNU General Public License as published by
  6. # the Free Software Foundation; either version 2, or (at your option)
  7. # any later version.
  8. #
  9. # This program is distributed in the hope that it will be useful,
  10. # but WITHOUT ANY WARRANTY; without even the implied warranty of
  11. # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  12. # GNU General Public License for more details.
  13. #
  14. # You should have received a copy of the GNU General Public License
  15. # along with this program; if not, write to the Free Software
  16. # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
  17.  
  18. PACKAGE = @PACKAGE@
  19. VERSION = @VERSION@
  20.  
  21. SHELL = /bin/sh
  22.  
  23. srcdir = @srcdir@
  24. top_srcdir = @top_srcdir@
  25. VPATH = @srcdir@
  26.  
  27. prefix = @prefix@
  28. exec_prefix = @exec_prefix@
  29. transform = @program_transform_name@
  30. libdir = $(prefix)/lib
  31. includedir = $(prefix)/include
  32. datadir = $(prefix)/@DATADIRNAME@
  33. localedir = $(datadir)/locale
  34. gnulocaledir = $(prefix)/share/locale
  35. gettextsrcdir = $(prefix)/share/gettext
  36. aliaspath = $(localedir):.
  37. subdir = intl
  38.  
  39. INSTALL = @INSTALL@
  40. INSTALL_DATA = @INSTALL_DATA@
  41.  
  42. AR = ar
  43. CC = @CC@
  44. RANLIB = @RANLIB@
  45.  
  46. DEFS = -DLOCALEDIR=\"$(localedir)\" -DGNULOCALEDIR=\"$(gnulocaledir)\" \
  47. -DLOCALE_ALIAS_PATH=\"$(aliaspath)\" @DEFS@
  48. CFLAGS = @CFLAGS@
  49.  
  50. COMPILE = $(CC) -c $(DEFS) $(INCLUDES) $(CPPFLAGS) $(CFLAGS) $(XCFLAGS)
  51.  
  52. HEADERS = $(COMHDRS) libgettext.h
  53. COMHDRS = gettext.h gettextP.h hash-string.h
  54. SOURCES = $(COMSRCS) intl-compat.c cat-compat.c
  55. COMSRCS = bindtextdom.c dcgettext.c dgettext.c gettext.c \
  56. finddomain.c loadmsgcat.c localealias.c textdomain.c
  57. OBJECTS = @INTLOBJS@ bindtextdom.o dcgettext.o dgettext.o gettext.o \
  58. finddomain.o loadmsgcat.o localealias.o textdomain.o
  59. CATOBJS = cat-compat.o ../po/cat-id-tbl.o
  60. GETTOBJS = intl-compat.o
  61. DISTFILES.common = ChangeLog Makefile.in linux-msg.sed po2tbl.sed.in \
  62. xopen-msg.sed $(HEADERS) $(SOURCES)
  63. DISTFILES = $(DISTFILES.common) VERSION
  64. DISTFILES.gettext = $(DISTFILES.common) libintl.glibc libintl.inst
  65.  
  66. .SUFFIXES:
  67. .SUFFIXES: .c .o
  68. .c.o:
  69.     $(COMPILE) $<
  70.  
  71. INCLUDES = -I.. -I. -I$(top_srcdir)/intl -I$(top_srcdir)/lib
  72.  
  73. all: libintl.a
  74.  
  75.  
  76. libintl.a: $(OBJECTS)
  77.     rm -f $@
  78.     $(AR) cru $@ $(OBJECTS)
  79.     $(RANLIB) $@
  80.  
  81. ../po/cat-id-tbl.o: ../po/cat-id-tbl.c $(top_srcdir)/po/$(PACKAGE).pot
  82.     cd ../po && $(MAKE) cat-id-tbl.o
  83.  
  84. check install: all
  85.  
  86. # This installation goal is only used in GNU gettext.  Packages which
  87. # only use the library should use install instead.
  88. #
  89. # We must not install the libintl.h/libintl.a files if we are on a system
  90. # which has the gettext() function in its C library or in a separate
  91. # library.  A special case is where configure found a previously installed
  92. # GNU gettext library.  If you want to use the one which comes with this
  93. # version of the package, you have to use `configure --with-gnu-gettext'.
  94. install-src: install
  95.     $(top_srcdir)/mkinstalldirs $(libdir) $(includedir) $(gettextsrcdir)
  96.     if test -f libintl.h; then \
  97.       $(INSTALL_DATA) $(srcdir)/libintl.inst \
  98.         $(includedir)/libintl.h; \
  99.       $(INSTALL_DATA) libintl.a $(libdir)/libintl.a; \
  100.     fi
  101.     cd $(srcdir) && \
  102.     for file in $(DISTFILES.common); do \
  103.       $(INSTALL_DATA) $$file $(gettextsrcdir)/intl-$$file; \
  104.     done
  105.     $(INSTALL_DATA) VERSION $(gettextsrcdir)/intl-VERSION
  106.  
  107. uninstall:
  108.     for file in $(DISTFILES); do \
  109.       rm -f $(gettextsrcdir)/intl-$$file; \
  110.     done
  111.  
  112. info dvi:
  113.  
  114. $(OBJECTS): ../config.h libgettext.h
  115. bindtextdom.o finddomain.o loadmsgcat.o: gettextP.h gettext.h
  116. dcgettext.o: gettextP.h gettext.h hash-string.h
  117.  
  118. tags: TAGS
  119.  
  120. TAGS: $(HEADERS) $(SOURCES)
  121.     here=`pwd`; cd $(srcdir) && etags -o $$here/TAGS $(HEADERS) $(SOURCES)
  122.  
  123. id: ID
  124.  
  125. ID: $(HEADERS) $(SOURCES)
  126.     here=`pwd`; cd $(srcdir) && mkid -f$$here/ID $(HEADERS) $(SOURCES)
  127.  
  128.  
  129. mostlyclean:
  130.     rm -f *.a *.o core core.*
  131.  
  132. clean: mostlyclean
  133.  
  134. distclean: clean
  135.     rm -f Makefile ID TAGS po2msg.sed po2tbl.sed libintl.h
  136.  
  137. maintainer-clean: distclean
  138.     @echo "This command is intended for maintainers to use;"
  139.     @echo "it deletes files that may require special tools to rebuild."
  140.  
  141.  
  142. distdir = ../$(PACKAGE)-$(VERSION)/$(subdir)
  143. dist: Makefile $(DISTFILES)
  144.     for file in $(DISTFILES); do \
  145.       ln $(srcdir)/$$file $(distdir) 2> /dev/null \
  146.         || cp -p $(srcdir)/$$file $(distdir); \
  147.     done
  148.  
  149. # This dist goal is only used in GNU gettext.  GNU gettext needs not contain
  150. # the file `VERSION' but contains some other files which should not be
  151. # distributed in other packages.
  152. dist-gettext: Makefile $(DISTFILES.gettext)
  153.     for file in $(DISTFILES.gettext); do \
  154.       ln $(srcdir)/$$file $(distdir) 2> /dev/null \
  155.         || cp -p $(srcdir)/$$file $(distdir); \
  156.     done
  157.  
  158. dist-libc:
  159.     tar zcvf intl-glibc.tar.gz $(COMSRCS) $(COMHDRS) libintl.h.glibc
  160.  
  161. Makefile: Makefile.in ../config.status
  162.     cd .. && CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= ./config.status
  163.  
  164. # Tell versions [3.59,3.63) of GNU make not to export all variables.
  165. # Otherwise a system limit (for SysV at least) may be exceeded.
  166. .NOEXPORT:
  167.